package com.ruoyi.omp.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.omp.api.domain.FeApartmentBill;
import com.ruoyi.omp.api.domain.FeBill;
import com.ruoyi.omp.api.factory.RemoteBillFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: cjie
 * @description: 账单信息服务
 * @date: 2021/9/23
 */
@FeignClient(contextId = "remoteBillService", value = ServiceNameConstants.OMP_LIFE_SERVICE, fallbackFactory =
        RemoteBillFactory.class)
public interface RemoteBillService {

    /**
     * 查询账单信息
     * @param feBill 账单信息
     * @return
     */
    @PostMapping(value = "/feBill/listBill")
    R<List<FeBill>> listBill(@RequestBody FeBill feBill);

    /**
     * 查询对应记录收费类型的最后一条账单信息
     * @param feBill 账单信息
     * @return
     */
    @PostMapping(value = "/feBill/lastBill")
    R<FeBill> lastBill(@RequestBody FeBill feBill);

    /**
     * 新增账单
     * @param feBill 账单信息
     * @return
     */
    @PostMapping("/feBill/add")
    R addBill(@RequestBody FeBill feBill);


    /**
     * 新增公寓账单
     * @param feBill 公寓账单信息
     * @return
     */
    @PostMapping("/feApartBill/add")
    R addApartBill(@RequestBody FeApartmentBill feBill);

}
